import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;

@EqualsAndHashCode
@Data
public class Menu implements Serializable {

    public Menu(Long id,String title, String icon, Integer order) {
        this.id = id;
        this.parentId = 0L;
        this.title = title;
        this.icon = icon;
        this.order = order;
    }

    public Menu(Long id, Long parentId, String title, String jump, Integer order) {
        this.id = id;
        this.parentId = parentId;
        this.title = title;
        this.jump = jump;
        this.order = order;
    }

    private Long id;

    /** 上级节点ID*/
    private Long parentId;

    /**
     * 节点名称
     * */
    private String title;

    /**
     * 节点图标
     * */
    private String icon;

    /**
     * 节点跳转
     * */
    private String jump;

    /**
     * 节点顺序
     */
    private Integer order;
}
